#pragma once
#ifndef __G_TEXTURE_H__
#define __G_TEXTURE_H__

#include "GTypes.h"

namespace GEngine
{
	enum GTextureType
	{
		G_TT_NONE				= 0,
		G_TT_1D					= 1,
		G_TT_1D_ARRAY			= 2,
		G_TT_2D					= 3,
		G_TT_2D_ARRAY			= 4,
		G_TT_3D					= 5,
		G_TT_CUBE				= G_TT_2D_ARRAY,
	};

	enum GTextureFormat
	{
		G_TF_NONE				= 0,
		
		// Int 1-16 byte
		G_TF_SINT_R8			= 1,
		G_TF_SINT_R16			= 2,
		G_TF_SINT_R32			= 3,
		G_TF_SINT_R8G8			= 4,
		G_TF_SINT_R16G16		= 5,
		G_TF_SINT_R32G32		= 6,
		G_TF_SINT_R8G8B8A8		= 7,
		G_TF_SINT_R16G16B16A16	= 8,
		G_TF_SINT_R32G32B32A32	= 9,
		
		// UInt 1-16 byte
		G_TF_UINT_R8			= 10,
		G_TF_UINT_R16			= 11,
		G_TF_UINT_R32			= 12,
		G_TF_UINT_R8G8			= 13,
		G_TF_UINT_R16G16		= 14,
		G_TF_UINT_R32G32		= 15,
		G_TF_UINT_R8G8B8A8		= 16,
		G_TF_UINT_R16G16B16A16	= 17,
		G_TF_UINT_R32G32B32A32	= 18,
		
		// Float (-1)-(1) Range
		G_TF_SNORM_R8			= 19,
		G_TF_SNORM_R16			= 20,
		G_TF_SNORM_R8G8			= 21,
		G_TF_SNORM_R16G16		= 22,
		G_TF_SNORM_R8G8B8A8		= 23,
		G_TF_SNORM_R16G16B16A16	= 24,

		// Float (0)-(1) Range
		G_TF_UNORM_R8			= 25,
		G_TF_UNORM_R16			= 26,
		G_TF_UNORM_R8G8			= 27,
		G_TF_UNORM_R16G16		= 28,
		G_TF_UNORM_R8G8B8A8		= 29,
		G_TF_UNORM_R16G16B16A16	= 30,

		// Float 2-16 byte
		G_TF_FLOAT_R16			= 31,
		G_TF_FLOAT_R32			= 32,
		G_TF_FLOAT_R16G16		= 33,
		G_TF_FLOAT_R32G32		= 34,
		G_TF_FLOAT_R16G16B16A16	= 36,
		G_TF_FLOAT_R32G32B32A32	= 37,
		
		// Compressed
		G_TF_UNORM_BC1			= 38,
		G_TF_UNORM_BC2			= 39,
		G_TF_UNORM_BC3			= 40,
		G_TF_SNORM_BC4			= 41,
		G_TF_UNORM_BC4			= 42,
		G_TF_SNORM_BC5			= 43,
		G_TF_UNORM_BC5			= 44,
		G_TF_UFLOAT_BC6H		= 45,
		G_TF_SFLOAT_BC6H		= 46,
		G_TF_UNORM_BC7			= 47,
		
		// Shadow Mapping
		G_TF_SHADOW_NULL		= 48,
		G_TF_SHADOW_INTZ		= 49,

		G_TF_COUNT				= 50,
	};

	// Move to depth buffer 
	enum GTextureFormatDepth
	{
		G_TFD_NONE					= 0,
		G_TFD_UINT_D24				= 1,
		G_TFD_FLOAT_D32				= 2,
		G_TFD_UNORM_D16				= 3,
		G_TFD_UNORM_D24_UINT_S8		= 4,
		G_TFD_FLOAT_D32_UINT_S8X24	= 5,
	};


	class GTexture
	{
	public:
						GTexture();
						~GTexture();

		static GSize	GetBlockSize(GTextureFormat Format);
	};

}

#endif